# Model 2 #
stargazer(
title="Summary Statistics for Universalism Dataset",
as.data.frame(vdem_spaw[, cols3]), type = "latex",
summary.stat = c("n", "mean", "median", "min", "max", "sd"),
covariate.labels= c("Universalism", "Pol Inclusion (w)", " Pol Inclusion (b)",
"Party Institutionalization (w)", "Party Institutionalization (b)",
"Electoral Autocracy (w)","Electoral Autocracy (b)",
"Party organizations (w)", "Party organizations",
"Party branches (w)", "Party branches", "Party linkages (w)", "Party linkages",
"Distinct party platforms (w)", "Distinct party platforms",
"Legislative party cohesion (w)", "Legislative party cohesion")
)
# Model 3 and 5 #
stargazer(
title="Summary Statistics for Redistribution Dataset",
as.data.frame(vdem_rel2[, cols2]), type = "latex",
summary.stat = c("n", "mean", "median", "min", "max", "sd"),
covariate.labels= c("Rel. Redistribution", "Pol Inclusion (w)", " Pol Inclusion (b)",
"Party Institutionalization (w)",
"Party Institutionalization (b)", "Electoral Autocracy (w)","Electoral Autocracy (b)",
"GDP pc (w)", "GDP pc (b)", "Population log (w)", "Population log (b)",
"Communist Ideology (w)","Communist Ideology (b)",
"Urban Percentage (w)", "Urban Percentage (b)", "Manufacturing \ of GDP (w)",
"Manufacturing % of GDP (b)",
"Party organizations (w)", "Party organizations",
"Party branches (w)", "Party branches", "Party linkages (w)", "Party linkages",
"Distinct party platforms (w)", "Distinct party platforms",
"Legislative party cohesion (w)", "Legislative party cohesion")
)
# Model 4 and 6 #
stargazer(
title="Summary Statistics for Universalism Dataset",
as.data.frame(vdem_spaw2[, cols4]), type = "latex",
summary.stat = c("n", "mean", "median", "min", "max", "sd"),
covariate.labels= c("Universalism", "Pol Inclusion (w)", " Pol Inclusion (b)",
"Party Institutionalization (w)",
"Party Institutionalization (b)", "Electoral Autocracy (w)","Electoral Autocracy (b)",
"GDP pc (w)", "GDP pc (b)", "Population log (w)", "Population log (b)",
"Communist Ideology (w)","Communist Ideology (b)",
"Urban Percentage (w)", "Urban Percentage (b)", "Manufacturing \ of GDP (w)",
"Manufacturing % of GDP (b)",
"Party organizations (w)", "Party organizations",
"Party branches (w)", "Party branches", "Party linkages (w)", "Party linkages",
"Distinct party platforms (w)", "Distinct party platforms",
"Legislative party cohesion (w)", "Legislative party cohesion")
)
## reference Level for Factor ##
vdem_rel$auto_regime_type  <- as.factor(vdem_rel$auto_regime_type)
vdem_rel2$auto_regime_type  <- as.factor(vdem_rel2$auto_regime_type)
vdem_rel$auto_regime_type = relevel(vdem_rel$auto_regime_type, ref=1)
vdem_rel2$auto_regime_type = relevel(vdem_rel2$auto_regime_type, ref=1)
vdem_spaw$auto_regime_type  <- as.factor(vdem_spaw$auto_regime_type)
vdem_spaw2$auto_regime_type  <- as.factor(vdem_spaw2$auto_regime_type)
vdem_spaw$auto_regime_type = relevel(vdem_spaw$auto_regime_type, ref=1)
vdem_spaw2$auto_regime_type = relevel(vdem_spaw2$auto_regime_type, ref=1)
#### Main Models ####
m1 <- lmer(rel_red ~  year + pol_incl_dm + pol_incl_gm + v2xps_party_dm + v2xps_party_gm +
auto_regime_type + pol_incl_dm*auto_regime_type + v2xps_party_dm*auto_regime_type +
(1  | country_id),
data = vdem_rel,
REML = TRUE) # REML estimation for parameters
isSingular(m1, tol = 1e-05) # FALSE
performance::check_model(m1)
m2 <- lmer(universalism_all ~ year + pol_incl_dm + pol_incl_gm + v2xps_party_dm + v2xps_party_gm +
auto_regime_type + pol_incl_dm*auto_regime_type + v2xps_party_dm*auto_regime_type +
(1  | country_id),
data = vdem_spaw,
REML = TRUE) # REML estimation for parameters
isSingular(m2, tol = 1e-05) # FALSE
performance::check_model(m2)
m3 <- lmer(rel_red ~ year + pol_incl_dm + pol_incl_gm + v2xps_party_dm + v2xps_party_gm +
auto_regime_type + pol_incl_dm*auto_regime_type + v2xps_party_dm*auto_regime_type +
e_migdppcln_dm + e_migdppcln_gm +
e_wb_pop_ln_dm + e_wb_pop_ln_gm + v2exl_legitideolcr_1_dm + v2exl_legitideolcr_1_gm +
urban_percent_dm + urban_percent_gm +  manufacturing_percent_ipol_dm +  manufacturing_percent_ipol_gm +
(1  | country_id),
data = vdem_rel2)
isSingular(m3, tol = 1e-05) # FALSE
performance::check_model(m3)
m4 <- lmer(universalism_all ~ year + pol_incl_dm + pol_incl_gm + v2xps_party_dm + v2xps_party_gm +
auto_regime_type + pol_incl_dm*auto_regime_type + v2xps_party_dm*auto_regime_type +
e_migdppcln_dm + e_migdppcln_gm +
e_wb_pop_ln_dm + e_wb_pop_ln_gm + v2exl_legitideolcr_1_dm + v2exl_legitideolcr_1_gm +
urban_percent_dm + urban_percent_gm +  manufacturing_percent_ipol_dm +  manufacturing_percent_ipol_gm +
(1  | country_id),
data = vdem_spaw2)
isSingular(m4, tol = 1e-05) # FALSE
performance::check_model(m4)
m5 <- lmer(rel_red ~ year + pol_incl_dm + pol_incl_gm + v2xps_party_dm + v2xps_party_gm +
auto_regime_type +pol_incl_dm*v2xps_party_dm*auto_regime_type +
e_migdppcln_dm + e_migdppcln_gm +
e_wb_pop_ln_dm + e_wb_pop_ln_gm + v2exl_legitideolcr_1_dm + v2exl_legitideolcr_1_gm +
urban_percent_dm + urban_percent_gm +  manufacturing_percent_ipol_dm +  manufacturing_percent_ipol_gm +
(1  | country_id),
data = vdem_rel2)
isSingular(m5, tol = 1e-05) # FALSE
performance::check_model(m5)
m6 <- lmer(universalism_all ~ year + pol_incl_dm + pol_incl_gm + v2xps_party_dm + v2xps_party_gm +
auto_regime_type + pol_incl_dm*v2xps_party_dm*auto_regime_type +
e_migdppcln_dm + e_migdppcln_gm +
e_wb_pop_ln_dm + e_wb_pop_ln_gm + v2exl_legitideolcr_1_dm + v2exl_legitideolcr_1_gm +
urban_percent_dm + urban_percent_gm +  manufacturing_percent_ipol_dm +  manufacturing_percent_ipol_gm +
(1  | country_id),
data = vdem_spaw2)
isSingular(m6, tol = 1e-05) # FALSE
performance::check_model(m6)
#### Figure 1  based on Model 3 and 4 ####
#two way intercation effect plots
margin_data <- ggpredict(m3, terms = c("pol_incl_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Multiparty Autocracy"))
plot1 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot1
plot1 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted relative redistribution") +
ylim(-1,16) +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot1 <- plot(margin_data,
colors = "bw",
facet = TRUE,
ylim = c (-1,16)) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot1 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
margin_data <- ggpredict(m3, terms = c("v2xps_party_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Mulitparty Autocracy"))
plot2 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Party Institutionalization (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0,16)
labs(title = " ",
x = "Party Institutionalization (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0,16) +
labs(title = " ",
x = "Party Institutionalization (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0,15) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot1 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0,15) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
margin_data <- ggpredict(m3, terms = c("v2xps_party_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Mulitparty Autocracy"))
plot2 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0,15) +
labs(title = " ",
x = "Party Institutionalization (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted universalism old-age pensions") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
margin_data <- ggpredict(m4, terms = c("pol_incl_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Multiparty Autocracy"))
plot3 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0, 12.5) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted universalism old-age pensions") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
margin_data <- ggpredict(m4, terms = c("v2xps_party_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Mulitparty Autocracy"))
plot4 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0, 12.5) +
labs(title = " ",
x = "Party Institutionalization (within)",
y = "Predicted universalism old-age pensions") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
ggarrange(plot1, plot2,
labels = c("a", "b"),
ncol = 2, nrow = 1,
common.legend = TRUE)
ggsave("output/margins/Figure1_main.pdf", height = 12, width = 32, units= c("cm"))
ggsave("output/margins/Figure1_main.png", height = 12, width = 32, units= c("cm"), dpi = 1200)
ggsave("output/margins/Figure1_main_600dpi.png", height = 12, width = 32, units= c("cm"), dpi = 600)
ggsave("output/margins/Figure1_main_400dpi.png", height = 12, width = 32, units= c("cm"), dpi = 400)
ggarrange(plot3, plot4,
labels = c("a", "b"),
ncol = 2, nrow = 1,
common.legend = TRUE)
ggsave("output/margins/Figure1_SA.pdf", height = 14, width = 32, units= c("cm"))
ggsave("output/margins/Figure1_SA.png", height = 14, width = 32, units= c("cm"), dpi = 1200)
margin_data <- ggpredict(m4, terms = c("pol_incl_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Multiparty Autocracy"))
plot3 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0, 12.5) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted universalism old-age pensions") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot3
plot3 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted universalism old-age pensions") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot3
plot4
plot4 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Party Institutionalization (within)",
y = "Predicted universalism old-age pensions") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot4
margin_data <- ggpredict(m4, terms = c("pol_incl_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Multiparty Autocracy"))
plot3 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0,22) +
labs(title = " ",
x = "Pol Inclusion (within)",
y = "Predicted universalism old-age pensions") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
margin_data <- ggpredict(m4, terms = c("v2xps_party_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Mulitparty Autocracy"))
plot4 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
ylim(0,22) +
labs(title = " ",
x = "Party Institutionalization (within)",
y = "Predicted universalism old-age pensions") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
plot4
plot3
ggarrange(plot3, plot4,
labels = c("a", "b"),
ncol = 2, nrow = 1,
common.legend = TRUE)
ggsave("output/margins/Figure1_SA.pdf", height = 14, width = 32, units= c("cm"))
ggsave("output/margins/Figure1_SA.png", height = 14, width = 32, units= c("cm"), dpi = 1200)
ggsave("output/margins/Figure1_SA.pdf", height = 12, width = 32, units= c("cm"))
ggsave("output/margins/Figure1_SA.png", height = 12, width = 32, units= c("cm"), dpi = 1200)
#### Figure 2 based on Model 5 and 6 ####
# three way interaction effect plots
sd(vdem_rel2$pol_incl_dm)
margin_data <- ggpredict(m5, terms = c("v2xps_party_dm", "pol_incl_dm[-0.37, 0.37]", "auto_regime_type"))
margin_data$facet <- factor(margin_data$facet, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Multiparty Autocracy"))
margin_data$group <- factor(margin_data$group, levels = c("-0.37", "0.37"),
labels = c("-1 SD", "+ 1 SD"))
plot1 <- plot(margin_data,
facet = TRUE) +
labs(title = " ",
color = "Political Inlusion (within)",
x = "Party Institutionalization (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed") +
scale_colour_grey(start = 0.1, end = 0.4) +
scale_fill_grey(start = 0.1, end = 0.4)
#### Figure 2 based on Model 5 and 6 ####
# three way interaction effect plots
sd(vdem_rel2$pol_incl_dm)
margin_data <- ggpredict(m5, terms = c("v2xps_party_dm", "pol_incl_dm[-0.37, 0.37]", "auto_regime_type"))
margin_data$facet <- factor(margin_data$facet, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Multiparty Autocracy"))
margin_data$group <- factor(margin_data$group, levels = c("-0.37", "0.37"),
labels = c("-1 SD", "+ 1 SD"))
plot1 <- plot(margin_data,
facet = TRUE) +
labs(title = " ",
color = "Political Inlusion (within)",
x = "Party Institutionalization (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed") +
scale_colour_grey(start = 0.1, end = 0.4) +
scale_fill_grey(start = 0.1, end = 0.4)
sd(vdem_spaw2$pol_incl_dm)
margin_data <- ggpredict(m6, terms = c("v2xps_party_dm", "pol_incl_dm[-0.43, 0.43]", "auto_regime_type"))
margin_data$facet <- factor(margin_data$facet, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Multiparty Autocracy"))
margin_data$group <- factor(margin_data$group, levels = c("-0.43", "0.43"),
labels = c("-1 SD", "+ 1 SD"))
plot2 <- plot(margin_data,
facet = TRUE) +
labs(title = " ",
color = "Political Inlusion (within)",
x = "Party Institutionalization (within)",
y = "Predicted universalism old-age pensions") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed") +
scale_colour_grey(start = 0.1, end = 0.4) +
scale_fill_grey(start = 0.1, end = 0.4)
ggarrange(plot1,
ncol = 1, nrow = 1,
common.legend = TRUE)
ggsave("Output/Margins/Figure2_main.pdf", height = 18, width = 32, units= c("cm"))
ggsave("Output/Margins/Figure2_main.png", height = 18, width = 32, units= c("cm"), dpi = 1200)
ggsave("Output/Margins/Figure2_main_600dpi.png", height = 18, width = 32, units= c("cm"), dpi = 600)
ggsave("Output/Margins/Figure2_main_400dpi.png", height = 18, width = 32, units= c("cm"), dpi = 400)
m1.1 <- lmer(rel_red ~ year + pol_incl_dm + pol_incl_gm + v2psorgs_dm + v2psorgs_gm + v2psprbrch_dm + v2psprbrch_gm +
v2psprlnks_dm + v2psprlnks_gm + v2psplats_dm + v2psplats_gm + v2pscohesv_dm + v2pscohesv_gm +
auto_regime_type + pol_incl_dm*auto_regime_type + v2psorgs_dm*auto_regime_type +
v2psprbrch_dm*auto_regime_type + v2psprlnks_dm*auto_regime_type + v2psplats_dm*auto_regime_type +
v2pscohesv_dm*auto_regime_type +
(1  | country_id),
data = vdem_rel,
REML = TRUE) # REML estimation for parameters
isSingular(m1.1, tol = 1e-05) # FALSE
performance::check_model(m1.1)
m2.1 <- lmer(universalism_all ~ year + pol_incl_dm + pol_incl_gm + v2psorgs_dm + v2psorgs_gm + v2psprbrch_dm + v2psprbrch_gm +
v2psprlnks_dm + v2psprlnks_gm + v2psplats_dm + v2psplats_gm + v2pscohesv_dm + v2pscohesv_gm +
auto_regime_type + pol_incl_dm*auto_regime_type + v2psorgs_dm*auto_regime_type +
v2psprbrch_dm*auto_regime_type + v2psprlnks_dm*auto_regime_type + v2psplats_dm*auto_regime_type +
v2pscohesv_dm*auto_regime_type +
(1  | country_id),
data = vdem_spaw,
REML = TRUE) # REML estimation for parameters
isSingular(m2.1, tol = 1e-05) # FALSE
performance::check_model(m2.1)
m3.1 <- lmer(rel_red ~ year + pol_incl_dm + pol_incl_gm + v2psorgs_dm + v2psorgs_gm + v2psprbrch_dm + v2psprbrch_gm +
v2psprlnks_dm + v2psprlnks_gm + v2psplats_dm + v2psplats_gm + v2pscohesv_dm + v2pscohesv_gm +
auto_regime_type + pol_incl_dm*auto_regime_type + v2psorgs_dm*auto_regime_type +
v2psprbrch_dm*auto_regime_type + v2psprlnks_dm*auto_regime_type + v2psplats_dm*auto_regime_type +
v2pscohesv_dm*auto_regime_type +
e_migdppcln_dm + e_migdppcln_gm +
e_wb_pop_ln_dm + e_wb_pop_ln_gm + v2exl_legitideolcr_1_dm + v2exl_legitideolcr_1_gm +
urban_percent_dm + urban_percent_gm +  manufacturing_percent_ipol_dm +  manufacturing_percent_ipol_gm +
(1  | country_id),
data = vdem_rel2)
isSingular(m3.1, tol = 1e-05) # FALSE
performance::check_model(m3.1)
m4.1 <- lmer(universalism_all ~ year + pol_incl_dm + pol_incl_gm + v2psorgs_dm + v2psorgs_gm + v2psprbrch_dm + v2psprbrch_gm +
v2psprlnks_dm + v2psprlnks_gm + v2psplats_dm + v2psplats_gm + v2pscohesv_dm + v2pscohesv_gm +
auto_regime_type + pol_incl_dm*auto_regime_type + v2psorgs_dm*auto_regime_type +
v2psprbrch_dm*auto_regime_type + v2psprlnks_dm*auto_regime_type + v2psplats_dm*auto_regime_type +
v2pscohesv_dm*auto_regime_type +
e_migdppcln_dm + e_migdppcln_gm +
e_wb_pop_ln_dm + e_wb_pop_ln_gm + v2exl_legitideolcr_1_dm + v2exl_legitideolcr_1_gm +
urban_percent_dm + urban_percent_gm +  manufacturing_percent_ipol_dm +  manufacturing_percent_ipol_gm +
(1  | country_id),
data = vdem_spaw2)
isSingular(m4.1, tol = 1e-05) # FALSE
performance::check_model(m4.1)
m5.1 <- lmer(rel_red ~ year + pol_incl_dm + pol_incl_gm + v2psorgs_dm + v2psorgs_gm + v2psprbrch_dm + v2psprbrch_gm +
v2psprlnks_dm + v2psprlnks_gm + v2psplats_dm + v2psplats_gm + v2pscohesv_dm + v2pscohesv_gm +
auto_regime_type + v2psorgs_dm*auto_regime_type*pol_incl_dm +
v2psprbrch_dm*auto_regime_type*pol_incl_dm + v2psprlnks_dm*auto_regime_type*pol_incl_dm + v2psplats_dm*auto_regime_type*pol_incl_dm +
v2pscohesv_dm*auto_regime_type*pol_incl_dm +
e_migdppcln_dm + e_migdppcln_gm +
e_wb_pop_ln_dm + e_wb_pop_ln_gm + v2exl_legitideolcr_1_dm + v2exl_legitideolcr_1_gm +
urban_percent_dm + urban_percent_gm +  manufacturing_percent_ipol_dm +  manufacturing_percent_ipol_gm +
(1  | country_id),
data = vdem_rel2)
isSingular(m5.1, tol = 1e-05) # FALSE
performance::check_model(m5.1)
m6.1 <- lmer(universalism_all ~ year + pol_incl_dm + pol_incl_gm + v2psorgs_dm + v2psorgs_gm + v2psprbrch_dm + v2psprbrch_gm +
v2psprlnks_dm + v2psprlnks_gm + v2psplats_dm + v2psplats_gm + v2pscohesv_dm + v2pscohesv_gm +
auto_regime_type + v2psorgs_dm*auto_regime_type*pol_incl_dm +
v2psprbrch_dm*auto_regime_type*pol_incl_dm + v2psprlnks_dm*auto_regime_type*pol_incl_dm + v2psplats_dm*auto_regime_type*pol_incl_dm +
v2pscohesv_dm*auto_regime_type*pol_incl_dm +
e_migdppcln_dm + e_migdppcln_gm +
e_wb_pop_ln_dm + e_wb_pop_ln_gm + v2exl_legitideolcr_1_dm + v2exl_legitideolcr_1_gm +
urban_percent_dm + urban_percent_gm +  manufacturing_percent_ipol_dm +  manufacturing_percent_ipol_gm +
(1  | country_id),
data = vdem_spaw2)
isSingular(m6.1, tol = 1e-05) # FALSE
performance::check_model(m6.1)
#### Figure 3, Model 3 and 4 Interactions with different sub-components of Party Institutionalization ####
margin_data <- ggpredict(m3.1, terms = c("v2psorgs_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Mulitparty Autocracy"))
plot1 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Party Organizations (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
margin_data <- ggpredict(m3.1, terms = c("v2psprbrch_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Mulitparty Autocracy"))
plot2 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Party Branches (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
# Plot 3
margin_data <- ggpredict(m3.1, terms = c("v2psprlnks_dm ", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Mulitparty Autocracy"))
plot3 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Party Linkages (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
#Plot 4
margin_data <- ggpredict(m3.1, terms = c("v2psplats_dm ", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Mulitparty Autocracy"))
plot4 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Party Platforms (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
#Plot 5
margin_data <- ggpredict(m3.1, terms = c("v2pscohesv_dm", "auto_regime_type"))
margin_data$group <- factor(margin_data$group, levels = c("0", "1", "2"),
labels = c("Closed Autocracy", "Hegemonic Multiparty Autocracy", "Competitive Mulitparty Autocracy"))
plot5 <- plot(margin_data,
colors = "bw",
facet = TRUE) +
labs(title = " ",
x = "Legislative Party Cohesion (within)",
y = "Predicted relative redistribution") +
geom_hline(yintercept=0, linetype="solid") +
geom_hline(yintercept=median(vdem_rel2$rel_red), linetype="dashed")
ggarrange(plot1, plot2, plot3, plot4, plot5,
labels = c("a", "b", "c", "d", "e"),
ncol = 2, nrow = 3,
common.legend = TRUE)
ggsave("Output/Margins/Figure3_main.pdf", height = 25, width = 35, units= c("cm"))
ggsave("Output/Margins/Figure3_main.png", height = 25, width = 35, units= c("cm"), dpi = 1200)
ggsave("Output/Margins/Figure3_main_600dpi.png", height = 25, width = 35, units= c("cm"), dpi = 600)
ggsave("Output/Margins/Figure3_main_400dpi.png", height = 25, width = 35, units= c("cm"), dpi = 400)
